<template>
  <div style="padding: 20px">
    <h1>{{ form.noticeTitle }}</h1>
    <mavon-editor
      ref="md"
      :subfield="false"
      :toolbars="toolbarsObj"
      defaultOpen="preview"
      :editable="false"
      v-model="form.noticeContent"
      style="height: 80vh"
    >
    </mavon-editor>
  </div>
</template>

<script>
import { getNotice } from "@/api/system/notice";
export default {
  data() {
    return {
      courseId: "",
      form: {},
    };
  },
  created() {
    this.courseId = this.$route.query.courseId;
    this.getinfo();
  },
  methods: {
    getinfo() {
      getNotice(this.courseId).then((response) => {
        this.form = response.data;
      });
    },
  },
};
</script>
